<form [formGroup]="configForm">
  <ng-tools-alert #alert [options]="alterOption"></ng-tools-alert>
  <div class="form-group row">
    <label for="g_name" class="col-3 col-form-label text-right">群名</label>
    <div class="col-7">
      <input id="g_name" formControlName="g_name">
    </div>
  </div>
  <div class="form-group row" *ngIf="currentGroup !== null">
    <label for="id" class="col-3 col-form-label text-right">群ID</label>
    <div class="col-7">
      <input id="id" formControlName="id">
    </div>
  </div>
  <div class="form-group row">
    <label for="robotImage" class="col-3 col-form-label text-right">群头像</label>
    <img style="height: 40px;width: 40px; margin-left: 15px" #imageElement id="robotImage" [src]="imageUrl" onerror="this.src='../../../../../assets/cat.png'" (click)="changeAvatar()">
    <input #fileInput type="file" (input)="selectFile($event)" style="display: none">
  </div>
  <div class="form-group row">
    <label for="announcement" class="col-3 col-form-label text-right">群公告</label>
    <div class="col-7">
      <input id="announcement" formControlName="announcement">
    </div>
  </div>
  <div class="form-group row">
    <label for="robot_group_id" class="col-3 col-form-label text-right">机器人组ID</label>
    <div class="col-7">
      <input id="robot_group_id" formControlName="robot_group_id">
    </div>
  </div>

  <div class="form-group row">
    <label for="play_type" class="col-3 col-form-label text-right">玩法规则</label>
    <div class="col-7">
      <input id="play_type" #inputElement formControlName="play_type" [value]="playTypeInfo"> <button class="btn btn-sm ml-2" (click)="showChooseGameType()">点击修改</button>
    </div>
  </div>

  <div class="row">
    <div class="col-12 text-center">
      <button class="btn btn-sm btn-teal w-50" [disabled]="!configForm.valid" (click)="save()">
        保存信息
      </button>
    </div>
  </div>
</form>
<ng-tools-modal #modal></ng-tools-modal>
